var template = require('art-template')
const path = require('path');
const fs = require('fs');
const { dataArray } = require('../model/list');

console.log('dataArray----', dataArray);

const list = (req, res) => {
    var html = template(path.join(__dirname, '../view/list-html.art'), {
        data: dataArray
    });
    fs.writeFileSync(path.join(__dirname, '../public/list.html'), html)
    res.send(html);
};

exports.list = list;
